{% extends "../theme/bage.html" %}
{% block typebody %}
<div class="mtop">
    <ul class="breadcrumb">
        <li>{{ _('Current location') }}: <a href="{% module site_url() %}">{{ _('Home') }}</a></li>
        <li class="active">{{ _('User Info') }}</li>
    </ul>
</div>

<div class="row">

    <div class="col-sm-8">
        <div class="panel panel-black">

            <div class="panel-heading"><b> {{ _('User Info') }} </b></div>
            <div class="panel-body">
                <table class="table table-striped">
                    <tr>
                        <td><b>{{ _('User Name') }}</b>：</td>
                        <td>{{ userinfo.user_name }}</td>
                        <td style="width: 25%" rowspan="4">
                            {% if 'def_profile' in userinfo.extinfo %}
                            <img src=" {{ userinfo.extinfo['def_profile'] }}"
                                 class="img-thumbnail" alt="{{ userinfo.extinfo['def_profile'] }}">
                            {% end %}
                        </td>

                    </tr>
                    <tr>
                        <td><b>{{ _('Email') }}</b>：</td>
                        <td>{{ userinfo.user_email }}</td>
                    </tr>


                    <tr>
                        <td><b>{{ _('Gender') }}</b>：</td>
                        <td>{{ userinfo.extinfo['def_gender'] if 'def_gender' in userinfo.extinfo else '' }}</td>

                    </tr>

                    <tr>
                        <td><b>{{ _('Mobile') }}</b>：</td>
                        <td>{{ userinfo.extinfo['def_mobile'] if 'def_mobile' in userinfo.extinfo else '' }}</td>
                    </tr>


                </table>

                <a href="/user/changepass" class="btn btn-sm btn-primary">
                    <span class="glyphicon glyphicon-edit"></span>
                    {{ _('Change Password') }}</a>
                <a href="/user/changeinfo" class="btn btn-sm btn-primary">
                    <span class="glyphicon glyphicon-edit"></span>
                    {{ _('Modify Personal Information') }}</a>
                <a href="/user/logout" class="btn btn-sm btn-primary">
                    {{ _('Logout') }}</a>


            </div>
        </div>
    </div>


    <div class="col-sm-4">
        <div class="panel panel-black">
            <div class="panel-heading"><b> {{ _('Related operations') }} </b></div>

            <ul class="list-group">
                <li class="list-group-item">
                    <b>{{ _('List of published information') }}</b><br><br>


                    {% module publish_list_menu('publish') %}
                </li>
                <li class="list-group-item">
                    <a href="/entity_download/{% if userinfo %}{{ userinfo.uid }}{% end %}/"
                       class="btn btn-xs btn-warning" title="My download">
                        <span class="glyphicon glyphicon-save"></span>
                        {{ _('My download') }}</a>
                    <a href="/reply/get_by_user/{{ userinfo.uid }}/"
                       class="btn btn-xs btn-warning" title="My download">
                        <span class="glyphicon glyphicon-save"></span>
                        {{ _('My comments') }}</a>
                </li>
                {% if userinfo and (userinfo.user_name=='admin' or kwd.get('can_add',False)) %}
                <li class="list-group-item"><a href="/post/_add" class="btn btn-xs btn-success">
                    <span class="glyphicon glyphicon-list-alt"></span>
                    {{ _('Add Document') }}</a>
                    <a href="/publish/3" class="btn btn-xs btn-success">
                        <span class="glyphicon glyphicon-list-alt"></span>
                        {{ _('Publish Info') }}</a></li>
                {% end %}

                {% if userinfo and (userinfo.user_name=='admin' or kwd.get('assign_role',False)) %}
                <li class="list-group-item">


                    <a href="/entity_download/" class="btn btn-xs btn-warning">
                        <span class="glyphicon glyphicon-arrow-down"></span>
                        {{ _('Entity Download List') }}
                    </a>
                </li>
                {% end %}

                {% if userinfo and  kwd.get('assign_role',False) %}
                <li class="list-group-item">
                    <a href="/user/find/" class="btn btn-xs btn-primary">
                        <span class="glyphicon glyphicon-user"></span>
                        {{ _('Show All User') }}
                    </a>


                </li>

                {% end %}
            </ul>
        </div>
    </div>

</div>

{% end %}